<?php

namespace App\Repository;
use App\Models\Sales\OrderPay;

/**
 * 订单支付数据仓储类
 *
 * @package App\Http\Repository
 * @author WangBin
 * @mail: <849850352@qq.com>
 */
class OrderPayRepository extends BaseRepository
{
    /**
     * 保存支付单据
     *
     * @param array $data
     * @return int|mixed
     */
    public function save(array $data)
    {
        $query = new OrderPay();
        foreach ($data as $key => $value) {
            $query->{$key} = $value;
        }
        return $query->save();
    }
}
